/**
 * User: ShenBo
 * Created on: 2009-5-28, 21:20:29
 */

package shenbo.fetionlib.action;

import org.w3c.dom.Document;
import shenbo.fetionlib.response.FetionResponse;

public interface FetionAction<T extends FetionResponse> {

    public enum Protocol {
        HTTP, HTTPS
    }

    public enum Method {
        GET, POST
    }

    /**
     * This is called by FetionConnection to generate the request data
     * TODO: 1. probably not String, 2. rename to something better
     * @return the request data
     */
    String getRequestData();

    Protocol getProtocol();
    Method getMethod();

    /**
     *  Returns the processed response
     * @return The processed response  @param rawResponse
     */
    T processResponse(Document xmlDocument);

}
